<?php
$i=0;
?>
<div class="Center">
    <h2 class="showNextDiv pointer"><?php __('Number of Forms per Type PRM05_KPI')  ?></h2>
    <div class="isHidden">
        <table class="formstatus">
            <thead>
                <tr>
                    <th><?php  __('Type') ?></th>
                    <th><?php  __('Number') ?></th>
                </tr>
            </thead>
            <tbody>
                <?php foreach($types as $key => $val):  ?>
                <?php (($i%2)>0)?$cl='impair':$cl='pair';  ?>
                <tr class="<?php echo $cl  ?>">
                    <?php if($key=='Total'):  ?>
                        <td class="total"><?php echo __($key,true)  ?></td>
                        <td class="total"><?php echo $val  ?></td>
                    <?php else: ?>
                        <td><?php echo __($key,true)  ?></td>
                        <td><?php echo $val  ?></td>
                    <?php  endif; ?>
                </tr>
                <?php $i++;endforeach;  ?>
            </tbody>
        </table>
    </div>
    <h2 class="showNextDiv pointer"><?php __('Number of Forms per month and per Type PRM05_KPI')  ?></h2>
    <div class="isHidden">
        <div class="Center">
        <?php  foreach($moisT as $m => $stats): ?>
        <h2 class="showNextDiv pointer"><?php echo ucfirst($m).' : '.$stats['Total'] ; ?></h2>
        <div class="isHidden">
            <table class="formstatus">
                <thead>
                    <tr>
                        <th><?php  __('Type') ?></th>
                        <th><?php  __('Number') ?></th>
                    </tr>
                </thead>
                <tbody>
                    <?php foreach($stats as $key => $val):  ?>
                    <?php (($i%2)>0)?$cl='impair':$cl='pair';  ?>
                    <tr class="<?php echo $cl  ?>">
                        <?php if($key=='Total'):  ?>
                            <td class="total"><?php echo __($key,true)  ?></td>
                            <td class="total"><?php echo $val  ?></td>
                        <?php else: ?>
                            <td><?php echo __($key,true)  ?></td>
                            <td><?php echo $val  ?></td>
                        <?php  endif; ?>
                    </tr>
                    <?php $i++;endforeach;  ?>
                </tbody>
            </table>
        </div>
        <?php endforeach; ?>
        </div>
    </div>
</div>